package cn.labbook.bluetooth.service.impl;

import cn.labbook.bluetooth.entity.AdminRes;
import cn.labbook.bluetooth.entity.sql.AdminResourceInfo;
import cn.labbook.bluetooth.mapper.AdminResMapper;
import cn.labbook.bluetooth.service.IAdminResService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author lonzy
 * @since 2019-03-26
 */
@Service
public class AdminResServiceImpl extends ServiceImpl<AdminResMapper, AdminRes> implements IAdminResService {
    @Override
    /* @CacheEvict(cacheManager = "mybatisCacheManager", key = "#roleId", value     )*/
    public boolean saveBatchWithCache(String roleId, List<AdminRes> rolePrivilegeList) {
        return saveBatch(rolePrivilegeList);
    }

    public List<AdminResourceInfo> findAdminResourcess(String adminId){
        return this.baseMapper.findAdminResources(adminId);
    }

}
